require 'rubygems'
require 'test/unit'
require "sandbox_base_test"

class TestForeignInstanceEval < TestSandbox
	
	def test_method
		
		assert_raise RuntimeError, NoMethodError do
			self.sandbox.run( "foo.instance_eval do
								system('ls -l')
							end
							"
				)
		end
	end
	
	class X
	end
	
	def setup
		super
		
		sandbox.permit :foo
		
		def service_provider.foo
			X.new
		end
	end

end
